Skip to content

change suspicious_operation_groupings to work on the HIR instead of the AST #15443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

esther-ff
Copy link

@esther-ff esther-ff commented Aug 8, 2025

changelog: [suspicious_operation_groupings]: changed the lint to work on the HIR and included a check for the existence of a suggested field.

fixes #7086

As a short message, i have discovered a potential false positive, however i am not sure whether it should be part of this PR.

(I've also made a slight mistake with the last commit in this PR, i hope it doesn't affect anything. I'm a bit new to this)

@rustbot
Copy link
Collaborator

rustbot commented Aug 8, 2025

r? @y21

rustbot has assigned @y21.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 8, 2025
Copy link

github-actions bot commented Aug 8, 2025

Lintcheck changes for decf7d6

Lint Added Removed Changed
clippy::suspicious_operation_groupings 1 0 0

This comment will be updated if you push new changes

@samueltardieu
Copy link
Member

@esther-ff
Copy link
Author

esther-ff commented Aug 9, 2025

From what i see, it's not. I'll have to figure that out. I think it's just a case of checking whether the expression (so, self.coords in this case) has the suggested method? I think i can implement that soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

suspicious-operation-groupings generates a false positive, suggested code doesn't even compile
5 participants